package chapter04; /**
 * Created by V5470-I5 on 2016/3/16.
 */
import java.util.Arrays;
public class CopyArray {
    public static void main (String[] args){
        int []scores1={11,12,14,13,15,16,20,21,22,23};
        int []scores2=Arrays.copyOf(scores1,scores1.length);
        for(int score:scores2){
            System.out.printf("%3d",score);
        }System.out.println();
        scores2[0]=99;
        for(int score:scores1){
            System.out.printf("%3d",score);
        }
    }
}
